# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=rp-pppoe
pkgver=3.14
pkgrel=0
pkgdesc="PPP over Ethernet client (for xDSL support)"
url="https://dianne.skoll.ca/projects/rp-pppoe/"
arch="all"
license="GPL-2.0-or-later"
makedepends="ppp-dev linux-headers"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://dianne.skoll.ca/projects/rp-pppoe/download/rp-pppoe-$pkgver.tar.gz
	musl-fix.patch
	rp-pppoe.initd
	"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"/src
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-plugin=/usr/include/pppd
	make all
}

package() {
	cd "$builddir"/src
	make DESTDIR="$pkgdir" install
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
}

sha512sums="0fa26e9478d387d4752ab85837dab9d1464f27c1ca832bad265deb01b5c3565aa341e3c75278b43a56aed466f02861af11b3bc64bae932a13cb103c4f0b91a29  rp-pppoe-3.14.tar.gz
5f7e9d50be7c4b007bc2f86cee42b8e5dc4ead6a8def618441c0db0ecb083a6631bd90d6292279c2188986820f7b8f488b41ff6cb186bb541e3e705858a21034  musl-fix.patch
6d3457af1353f875cc007b69322636a89534f9c0cd4d598ad24fb29de4a38bdfabc8a717ca17896ca859eac2aea4a037e113c61c4d322cdf7247ca78a8609fa6  rp-pppoe.initd"
